<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 返回两个日期之间相差的天数 -->
    <script>
      let date = new Date()
      let date2 = new Date('2022-09-23')
      let day = date.getTime() - date2.getTime()
      let time = parseInt(day / (1000 * 60 * 60 * 24))
      console.log(time)
    </script>
  </body>
</html>
